﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Pager.ascx.cs" Inherits="XpressNews.Utils.UserControls.Pager" %>

<footer class="blog-pagination">
    <ul class="pagination">
        <%if (HasPreviousPage)
        {
                    %><li>
                        <a href="<%=Url %>?p=<%=PageNumber - 1 %>">&laquo;</a>
                    </li>
                    <% 
        }
        else
        { %>
            <li>
                <a>|||</a>
            </li>
            <%
        }%>
        <%for (int i = 1; i <= TotalPages; i++)
        {
                    %>
                    <li>
                        <a href="<%=Url %>?p=<%=i %>"><%=i %></a>
                    </li>
                    <% 
        }%>

        <%if (HasNextPage)
        {
                    %>
                    <li>
                        <a href="<%=Url %>?p=<%=PageNumber + 1 %>">&raquo;</a>
                    </li>
                    <% 
        }
        else
        { %>
                <li>
                    <a>|||</a>
                </li>
            <%
        }%>
    </ul>
</footer>